package a_math;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package a_math
 * @date 2024/4/6 15:08
 */
public class test08 {
    public static void main(String[] args) {

//        static LocaDateTime now()->创建localdateTime对象
        LocalDateTime now = LocalDateTime.now();
        System.out.println(now);
System.out.println(now.getYear());//获取年
System.out.println(now.getMonthValue());//获取月
System.out.println(now.getDayOfMonth());//获取日

    }
}
